// SPDX-License-Identifier: Mulan PSL v2
/*
 * Copyright (c) 2025 Huawei Technologies Co., Ltd.
 * This software is licensed under Mulan PSL v2.
 * You can use this software according to the terms and conditions of the Mulan PSL v2.
 * You may obtain a copy of Mulan PSL v2 at:
 *         http://license.coscl.org.cn/MulanPSL2
 *
 * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
 * EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
 * MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
 * See the Mulan PSL v2 for more details.
 */

#![cfg(target_os = "linux")]

// 生成的protobuf类型
// pub mod types {
//     pub mod journal {
//         pub mod v1 {
//             include!(concat!(env!("OUT_DIR"), "/xgpu.journal.v1.rs"));
//         }
//     }
//     
//     // 新增recorder模块
//     pub mod recorder {
//         pub mod v1 {
//             include!(concat!(env!("OUT_DIR"), "/xgpu.recorder.v1.rs"));
//         }
//     }
// }

// pub mod rpc {
//     pub mod internal_api {
//         pub mod v1 {
//             tonic::include_proto!("xgpu.rpc.internal_api.controller.v1");
//         }
//     }

//     pub mod cuda_api {
//         pub mod v1 {
//             tonic::include_proto!("xgpu.rpc.cuda_api.runtime.v1");
//             tonic::include_proto!("xgpu.rpc.cuda_api.driver.v1");
//         }
//     }
// }

// #[test]
// fn test() {
//     use crate::types::journal::v1::*;

//     let device = DeviceInfo {
//         device_id: 1,
//         device_name: "NVIDIA RTX 3060".to_string(),
//         total_memory: 4096 * 1024 * 1024 * 1024,
//         compute_capability: Some(ComputeCapability { major: 7, minor: 3 }),
//     };

//     println!("{:#?}", device);
// }

pub mod ipc;

// 为方便使用，重新导出recorder模块
// pub use types::recorder::v1 as proto_recorder;

// 重新导出常用类型
// pub use ipc::recorder::{
//     RequestLogger, RequestPlayer, RecorderConfig, 
//     RecordFormat, RecorderError
// };
// pub use proto_recorder::{
//     RequestRecord, ArgumentRecord, RecordFileHeader,
//     ArgumentType, ArgumentFlags
// };
